package com.ruoyi.contract.service;

import com.ice.common.model.IceShowNode;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.contract.domain.ConRule;
import com.ruoyi.contract.domain.IceConf;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.contract.domain.IceEditNode;
import com.ruoyi.contract.domain.IceFlow;

import java.io.Serializable;

/**
* @author 姚煜峰
* @description 针对表【ice_conf】的数据库操作Service
* @createDate 2023-07-10 11:33:13
*/
public interface IceConfService extends IService<IceConf> {

    boolean insertFlow(IceConf conf, IceFlow flow, ConRule rule) throws Exception;

    @DataSource(DataSourceType.ICE)
    @Override
    default boolean save(IceConf entity) {
        return IService.super.save(entity);
    }

    @DataSource(DataSourceType.ICE)
    @Override
    default IceConf getById(Serializable id) {
        return IService.super.getById(id);
    }

    @DataSource(DataSourceType.ICE)
    @Override
    default boolean updateById(IceConf entity) {
        return IService.super.updateById(entity);
    }

    boolean insertRelation(IceConf conf, ConRule rule) throws Exception;

    boolean saveResult(IceConf conf, ConRule rule) throws Exception;

    AjaxResult remove(IceEditNode node) throws Exception;

    boolean exchangeRelation(IceConf conf, ConRule rule) throws Exception;

    boolean exchangeFlow(IceConf conf, IceFlow flow, ConRule rule) throws Exception;

    boolean exchangeResult(IceConf conf, ConRule rule) throws Exception;

    AjaxResult edit(IceShowNode node, Long iceId) throws Exception;

    AjaxResult release(Long iceId) throws Exception;

    AjaxResult clean(Long iceId) throws Exception;

    AjaxResult move(IceEditNode node) throws Exception;
}
